NO TICKET: maintain contact schema | skip second contact if no info | persist invalid legacy phone data#216
Merged
Merged
Conversation
Codecov Report❌ Patch coverage is
|
jirhiker
reviewed
Nov 4, 2025
jirhiker
approved these changes
Nov 4, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
This PR addresses the following problem / context:
contactandphoneschema should not accommodate invalid legacy data (mostly phone numbers)Secondfields are nullHow
Implementation summary - the following was changed / added / removed:
IncompleteNMAPhonemodel to store that dataPhone.phonenon-nullableSecondFirstName,SecondLastName,SecodnCtctEmail, orSecondCtctPhoneare nullNotes
Any special considerations, workarounds, or follow-up work to note?
contactmodel I decided to put them in a separate class. This way thecontactmodel won't be compromised and amended for invalid legacy data. We can still easily display that invalid data, and if/when we decide to no longer display that data we can remove it fromContactResponseIncompleteNMAPhonebest describes the data. It is invalid in terms of Pydantic validations, but they still work (if an area code can be determined). We thought this would best communicate the state of the data to usersGET /contact/{contact_id}/phoneshould the invalid legacy records be returned too? I'm leaning toward no because they are in a separate table, but could see an argument for their inclusion